package com.summer.peony.system.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @ClassName: SysDept
 * @Description: TODO(部门实体类)
 * @author: TaoGe
 * @date: 2020年6月10日 下午3:35:38
 * @version: v0.0.1
 */
public class SysDept implements Serializable {

	/**
	 * @author: TaoGe
	 * @Fields: serialVersionUID:TODO(用一句话描述这个变量表示什么)
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * @author: TaoGe
	 * @Fields: deptId:TODO(部门id)
	 */
	private Integer deptId;

	/**
	 * @author: TaoGe
	 * @Fields: code:TODO(部门编码)
	 */
	private String code;

	/**
	 * @author: TaoGe
	 * @Fields: name:TODO(部门名称)
	 */
	private String name;

	/**
	 * @author: TaoGe
	 * @Fields: orderNum:TODO(排序)
	 */
	private Integer orderNum;

	/**
	 * @author: TaoGe
	 * @Fields: createTime:TODO(创建时间)
	 */
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date createTime;

	/**
	 * @author: TaoGe
	 * @Fields: updateTime:TODO(修改时间)
	 */
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date updateTime;

	/**
	 * @author: TaoGe
	 * @Fields: delFlag:TODO(是否删除 1：已删除 0：正常)
	 */
	private String delFlag;

	/**
	 * @author: TaoGe
	 * @Fields: parentId:TODO(上级部门id)
	 */
	private Integer parentId;

	/**
	 * @author: TaoGe
	 * @Fields: children:TODO(子部门)
	 */
	private List<SysDept> children = new ArrayList<SysDept>();

	public Integer getDeptId() {
		return deptId;
	}

	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code == null ? null : code.trim();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	public Integer getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag == null ? null : delFlag.trim();
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@Override
	public String toString() {
		return "SysDept [deptId=" + deptId + ", code=" + code + ", name=" + name + ", orderNum=" + orderNum
				+ ", createTime=" + createTime + ", updateTime=" + updateTime + ", delFlag=" + delFlag + ", parentId="
				+ parentId + "]";
	}

	public List<SysDept> getChildren() {
		return children;
	}

	public void setChildren(List<SysDept> children) {
		this.children = children;
	}

}